Range Majority in Constant Time and Linear Space

نویسندگان

  • Stephane Durocher
  • Meng He
  • J. Ian Munro
  • Patrick K. Nicholson
  • Matthew Skala
چکیده

Given an array A of size n, we consider the problem of answering range majority queries: given a query range [i..j] where 1 ≤ i ≤ j ≤ n, return the majority element of the subarray A[i..j] if it exists. We describe a linear space data structure that answers range majority queries in constant time. We further generalize this problem by defining range α-majority queries: given a query range [i..j], return all the elements in the subarray A[i..j] with frequency greater than α(j−i+1). We prove an upper bound on the number of α-majorities that can exist in a subarray, assuming that query ranges are restricted to be larger than a given threshold. Using this upper bound, we generalize our range majority data structure to answer range α-majority queries in O( 1 α ) time using O(n lg( 1 α + 1)) space, for any fixed α ∈ (0, 1). This result is interesting since other similar range query problems based on frequency have nearly logarithmic lower bounds on query time when restricted to linear space.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Range Majorities and Minorities in Arrays

Karpinski and Nekrich (2008) introduced the problem of parameterized range majority, which asks us to preprocess a string of length n such that, given the endpoints of a range, one can quickly find all the distinct elements whose relative frequencies in that range are more than a threshold τ . Subsequent authors have reduced their time and space bounds such that, when τ is fixed at preprocessin...

متن کامل

An optimal policy for deteriorating items with time-proportional deterioration rate and constant and time-dependent linear demand rate

In this paper, an economic order quantity (EOQ) inventory model for a deteriorating item is developed with the following characteristics: (i) The demand rate is deterministic and two-staged, i.e., it is constant in first part of the cycle and linear function of time in the second part. (ii) Deterioration rate is time-proportional. (iii) Shortages are not allowed to occur. The o...

متن کامل

Solution to time fractional generalized KdV of order 2q+1 and system of space fractional PDEs

Abstract. In this work, it has been shown that the combined use of exponential operators and integral transforms provides a powerful tool to solve time fractional generalized KdV of order 2q+1 and certain fractional PDEs. It is shown that exponential operators are an effective method for solving certain fractional linear equations with non-constant coefficients. It may be concluded that the com...

متن کامل

A characterization of curves in Galilean 4-space $G_4$

‎In the present study‎, ‎we consider a regular curve in Galilean‎ ‎$4$-space $mathbb{G}_{4}$ whose position vector is written as a‎ ‎linear combination of its Frenet vectors‎. ‎We characterize such‎ ‎curves in terms of their curvature functions‎. ‎Further‎, ‎we obtain‎ ‎some results of rectifying‎, ‎constant ratio‎, ‎$T$-constant and‎ ‎$N$-constant curves in $mathbb{G}_{4}$‎.

متن کامل

Comparison Of Hyperbolic And Constant Width Simultaneous Confidence Bands in Multiple Linear Regression Under MVCS Criterion

‎A simultaneous confidence band gives useful information on the reasonable range of the unknown regression model‎. ‎In this note‎, ‎when the predictor variables are constrained to a special ellipsoidal region‎, ‎hyperbolic and constant width confidence bonds for a multiple linear regression model are compared under the minimum volome confidence set (MVCS) criterion‎. ‎The size of one speical an...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Inf. Comput.

دوره 222  شماره 

صفحات  -

تاریخ انتشار 2011